<%--
  @author Tharanga Punchihewa
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<script type="text/javascript">
    $(document).ready(function () {
        $('.land-table').dataTable({
            "sPaginationType": "two_button",
            "bShowAll": true
        });
    });
</script>
<div id="land-registration-module-home-title" class="module-home-title">
    <s:a href="landAlienationModuleHome.do"><img src="${pageContext.request.contextPath}/images/interest-party.png"
                                                 alt="Land Registration"><span><s:label
            value="%{getText('land_alienation.label')}"/></span></s:a>
    <span class="module-title-breaker"> > </span>
    <s:a href="approvedInitApplicationFormsList.do"><img
            src="${pageContext.request.contextPath}/images/detailed-form.png"
            alt="Land Registration"><span><s:label
            value="%{getText('detailed_alienation_applications.label')}"/></span></s:a>

    <div id="back-button" align="right">
        <s:form><s:submit value="%{getText('back_btn.label')}" action="landAlienationModuleHome"/></s:form>
    </div>
</div>
<div class="page-title">
    <h2><s:label value="%{getText('detailed_alienation_applications.label')}"/></h2>
</div>

<div id="search-lands-form-outer">
    <s:form id="lands-by-alienation-type" name="lands-by-alienation-type">
        <table class="width-100">
            <tr>
                <td><s:label value="%{getText('alienation_method.label')}"/></td>
                <td><s:select list="alienationTypeList" id="alienation-type" name="alienationType"
                              headerValue="%{getText('all.label')}" headerKey="0"/></td>
                <td><s:submit value="%{getText('search.label')}" action="approvedInitApplicationFormsList"/></td>
            </tr>
        </table>
    </s:form>
</div>

<table class="width-100 margin-10-auto table land-table">
    <thead>
    <tr class="center-align table-header">
        <th><s:label value="%{getText('applied_date')}"/></th>
        <th><s:label value="%{getText('applicant_Name')}"/></th>
        <th><s:label value="%{getText('action.label')}"/></th>
    </tr>
    </thead>
    <tbody>
    <s:iterator status="status1" value="landApplicationList">
        <tr class="<s:if test="#status1.odd == true">able-row-odd</s:if>
        <s:else>table-row-even</s:else>">
            <td class="center-align"><s:property value="submitDate"/></td>
            <td class="center-align"><s:property value="holder.name"/></td>
            <td class="center-align">
                <s:url id="initDetailApplication" action="initDetailApplication">
                    <s:param name="applicationId" value="id"/>
                </s:url>
                <s:a href="%{initDetailApplication}" title="%{getText('add_detail_tooltip')}">
                    <img src="<s:url value='/images/detailed-form.png'/>" border="none" width="25"
                         height="25"/>
                </s:a>
            </td>
        </tr>
    </s:iterator>
    </tbody>
</table>